Divisibility Tests

Introduction

What Divisibility Really Means

Key idea:

A Quick Review of Congruence

These rules let us replace powers of 10 with simpler numbers.

Why Congruence Explains Divisibility Tests

Every whole number can be written as: $$n = a_0 + 10a_1 + 10^2 a_2 + 10^3 a_3 + \cdots$$ If we know what $10$, $10^2$, $10^3$, etc. are congruent to modulo $d$, we can replace them with simpler values.

This leads to rules involving:

Divisibility by 2, 5, and 10: Place Value at Work

These are the simplest divisibility rules because 10 is a multiple of 2, 5, and 10.
That means powers of 10 behave very simply modulo these numbers.

Divisibility by 2

Key idea

This means every digit except the last contributes a multiple of 2.

Rule

Examples

Divisibility by 5

Key idea

Rule

Examples

Divisibility by 10

Key idea

Rule

Examples

Divisibility by 3 and 9: The Sum‑of‑Digits Rule

These rules come from the fact that 10 behaves like 1 modulo 3 and 9.

Why the rule works

Key congruences

So: $$10^k \equiv 1^k \equiv 1.$$ This means: $$n = a_0 + 10a_1 + 10^2 a_2 + \cdots \equiv a_0 + a_1 + a_2 + \cdots$$ The number is congruent to the sum of its digits.

Divisibility by 3

Rule

Examples

Divisibility by 9

Rule

Examples

Divisibility by 11: Alternating Sums and Patterns

This rule comes from the fact that 10 behaves like −1 modulo 11.

Why the rule works

Key congruence

So:

Thus: $$n \equiv a_0 - a_1 + a_2 - a_3 + \cdots \pmod{11}.$$

Rule

A number is divisible by 11 iff the alternating sum of its digits is divisible by 11.

Examples

Example 1: 3,762

Compute alternating sum:

Since $0$ is divisible by 11 → 3,762 is divisible by 11.

Example 2: 84,5172

Compute alternating sum:

Since $-13$ is not divisible by 11 → not divisible by 11.

Example 3: 121

Divisibility by 4, 8, 25, and 125: Looking at the Last Few Digits

These rules come from the fact that powers of 10 eventually become 0 modulo these numbers.

Divisibility by 4

Key fact

Rule

Examples

Divisibility by 8

Key fact

Rule

Examples

Divisibility by 25

Key fact

Rule

Examples

Divisibility by 125

Key fact

Rule

Examples

General Strategy: Building Your Own Divisibility Tests

To create a divisibility test for any number $d$:

  1. Compute $10 \bmod d$, $10^2 \bmod d$, $10^3 \bmod d$, etc.
  2. Look for patterns:
    • Does $10^k \equiv 0$?
    • Does $10^k \equiv 1$ or $-1$?
  3. Rewrite $$n = a_0 + 10a_1 + 10^2 a_2 + \cdots$$ using these congruences.
  4. Simplify to get a rule involving:
    • last digits,
    • digit sums,
    • alternating sums,
    • or other combinations.

This method works for any divisor.

Common Misconceptions and Pitfalls

Applications in Problem‑Solving and Number Theory

Exercises

  1. Explain why only the last digit matters for divisibility by 2.

    Solution

    Explain why only the last digit matters for divisibility by 2.

    • Any number $n$ can be written as $$n = a_0 + 10a_1 + 10^2 a_2 + \cdots.$$
    • Modulo 2, we have $10 \equiv 0$, so $10a_1, 10^2 a_2, \dots$ are all divisible by 2.
    • Therefore, $$n \equiv a_0 \pmod{2}.$$
    • This means $n$ is divisible by 2 iff its last digit $a_0$ is even.
  2. Use congruence to prove the sum‑of‑digits rule for 9.

    Solution

    Use congruence to prove the sum‑of‑digits rule for 9.

    • Write $$n = a_0 + 10a_1 + 10^2 a_2 + \cdots.$$
    • Since $10 \equiv 1 \pmod{9}$, we have $10^k \equiv 1^k \equiv 1 \pmod{9}$.
    • Therefore, $$n \equiv a_0 + a_1 + a_2 + \cdots \pmod{9}.$$
    • So $n$ is divisible by 9 iff the sum of its digits is divisible by 9.
  3. Determine whether $57{,}321$ is divisible by 3, 9, or both.

    Solution

    Determine whether $57{,}321$ is divisible by 3, 9, or both.

    • Digit sum: $$5 + 7 + 3 + 2 + 1 = 18.$$
    • 18 is divisible by 3 and by 9.
    • Therefore, $57{,}321$ is divisible by both 3 and 9.
  4. Compute the alternating sum of digits for $84{,}517$ and determine whether it is divisible by 11.

    Solution

    Compute the alternating sum of digits for $84{,}517$ and determine whether it is divisible by 11.

    • Write digits from right to left: 7, 1, 5, 4, 8.
    • Alternating sum (starting with $+$ on the last digit): $$7 - 1 + 5 - 4 + 8 = 15.$$
    • 15 is not divisible by 11.
    • Therefore, $84{,}517$ is not divisible by 11.
  5. Explain why only the last two digits matter for divisibility by 4.

    Solution

    Explain why only the last two digits matter for divisibility by 4.

    • Any number $n$ can be written as $$n = 100k + d,$$

    where $d$ is the number formed by the last two digits.

    • Since $100 \equiv 0 \pmod{4}$, the term $100k$ is always divisible by 4.
    • Thus, $$n \equiv d \pmod{4}.$$
    • So $n$ is divisible by 4 iff $d$ (the last two digits) is divisible by 4.
  6. Determine whether $123{,}456$ is divisible by 8.

    Solution

    Determine whether $123{,}456$ is divisible by 8.

    • Only the last three digits matter: 456.
    • Compute $456 \div 8$:
      • $8 \cdot 50 = 400$
      • $456 - 400 = 56$
      • $8 \cdot 7 = 56$
      • So $456 = 8 \cdot 57$.
    • Therefore, 456 is divisible by 8, and so is $123{,}456$.
  7. Create a divisibility test for 7 using the fact that $10 \equiv 3 \pmod{7}$.

    Solution

    Create a divisibility test for 7 using the fact that $10 \equiv 3 \pmod{7}$.

    One simple approach:

    • Write $n = a_0 + 10a_1 + 10^2 a_2 + \cdots$.
    • Modulo 7, $10 \equiv 3$, so $10^2 \equiv 3^2 = 9 \equiv 2$, etc.
    • A practical test (one common version):
      • Rule: Take the last digit, double it, and subtract from the rest of the number.
      • If the result is divisible by 7 (possibly after repeating the process), then the original number is divisible by 7.

    Example:

    • Test 203:
      • Last digit: 3, rest: 20.
      • Compute $20 - 2\cdot 3 = 20 - 6 = 14$.
      • 14 is divisible by 7 → 203 is divisible by 7.
  8. Show that a number is divisible by 25 iff its last two digits form a number divisible by 25.

    Solution

    Show that a number is divisible by 25 iff its last two digits form a number divisible by 25.

    • Write $$n = 100k + d,$$

    where $d$ is the number formed by the last two digits.

    • Since $100 \equiv 0 \pmod{25}$, we have $$n \equiv d \pmod{25}.$$
    • Therefore, $n$ is divisible by 25 iff $d$ is divisible by 25.
    • The only two‑digit multiples of 25 are 00, 25, 50, and 75.
  9. Determine whether $99{,}999$ is divisible by 11.

    Solution

    Determine whether $99{,}999$ is divisible by 11.

    • Digits: 9, 9, 9, 9, 9.
    • Alternating sum (from right): $$9 - 9 + 9 - 9 + 9 = 9.$$
    • 9 is not divisible by 11.
    • Therefore, $99{,}999$ is not divisible by 11.
  10. True or false: If $10 \equiv 1 \pmod{d}$, then the sum‑of‑digits test works for $d$.

    Solution

    True or false: If $10 \equiv 1 \pmod{d}$, then the sum‑of‑digits test works for $d$.

    • If $10 \equiv 1 \pmod{d}$, then $10^k \equiv 1^k \equiv 1 \pmod{d}$.
    • So for $$n = a_0 + 10a_1 + 10^2 a_2 + \cdots,$$

    we have $$n \equiv a_0 + a_1 + a_2 + \cdots \pmod{d}.$$

    • Thus $n \equiv 0 \pmod{d}$ iff the sum of its digits is $\equiv 0 \pmod{d}$.

    Answer: True.